package com.blb.community_admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blb.community_admin.entity.SysRole;
import com.blb.community_admin.entity.SysUser;

import java.util.List;

public interface RoleMapper extends BaseMapper<SysRole> {
    List<SysRole> selectRolesByUserId(Long userId);

    //模糊查询
    IPage<SysRole> getByText(IPage<SysRole> page ,SysRole sysRole);

    //删除
    void deleteRoles(Long roleId);

    //根据用户名称查询用户
    SysRole selectByName(String roleName);

    /**
     * 根据userId查询权限信息
     * @param userId
     * @return
     */
    SysRole selectRoleByuserId(long userId);

}
